package com.nulldev.util.web.HttpClient.clients.nWS;

import java.io.InputStream;
import java.io.Reader;

import com.nulldev.util.web.HttpClient.HttpRequest;
import com.nulldev.util.web.HttpClient.providers.HttpClientProvider;
import com.nulldev.util.web.HttpClient.providers.websockets.HttpWebSocketRequest;

public class nWSProvider implements HttpClientProvider {

	@Override
	public HttpRequest<String> getString() {
		throw new UnsupportedOperationException("nWS does not provide requests.");
	}

	@Override
	public HttpRequest<byte[]> getBytes() {
		throw new UnsupportedOperationException("nWS does not provide requests.");
	}

	@Override
	public HttpRequest<InputStream> getStream() {
		throw new UnsupportedOperationException("nWS does not provide requests.");
	}

	@Override
	public HttpRequest<Reader> getReader() {
		throw new UnsupportedOperationException("nWS does not provide requests.");
	}

	public HttpWebSocketRequest getSocket() {
		return new nWSSocketRequest();
	}

	@Override
	public boolean isLegacyCompatible() {
		return false;
	}

	@Override
	public boolean providesRequests() {
		return false;
	}

	@Override
	public boolean providesWebSockets() {
		return true;
	}

	@Override
	public String getID() {
		return "nullUtil.webSockets";
	}

}
